Booting: - Power on is pressed. - CPU initializes itself and loads the 1st instruction (jump) from BIOS (or UEFI etc.) ROM (nowadays it's a rewriteable flash memory). - BIOS (Basic I/O System, specific to motherboard) loads, inits and tests hardware, lists available boot devices (HDD, CD, USB, ...) and selects one (BIOS used to be the abstraction for HW, but nowadays OS accesses HW directly.) - The boot device's first 512 bytes are MBR (Master Boot Record), which contains information about partitions of the device, plus a small executable code for loading an OS, called boot loader. Boot loader now gets executed. (Common boot loader is e.g. GRUB.) - Boot loader proceeds to load further boot loader stages from further device storage that will not be constrained by size that much. Normally stage 1.5 is loaded, then stage 2, but stage 2 can sometimes be loaded directly. These stages can include giving the user the choice of OS to load etc. Boot loader doesn't need drivers to access the file system because it can use BIOS's interface (can have lower performance). - Stage 2 of the boot loader loads the kernel itself (again can give the user the choice of kernel). - Kernel starts running, configures HW, loads drivers, mounts the root of the file system and runs the init process. Firmware: Runs on computer start, initializes HW and provides some basic services to SW (hard drive I/O, keyboard, display, ...) via given interface (interrupts). BIOS (Basic I/O System) - Old de facto standard by IBM, first proprietary, later reverse engineered. It has limitations, e.g. only 16bit CPU mode, only addresses 1 MB of RAM etc. Proprietary implementation exist as well as free ones (e.g. SeaBIOS). UEFI (Unified Extensible Firmware Interface) - A specification, new replacement for BIOS. Is more bloated, needs more memory and has a bigger feature creep (network capability, distant diagnostics, cryptography, big GUI etc.). Has proprietary and free implementations. coreboot (aka LinuxBIOS) - Free implementation of BIOS, uses proprietary blobs, like Linux. libreboot - Variant of coreboot without proprietary blobs (like Linux libre is to Linux). It is minimal and lightweight. Init: 1st OS process started after booting, runs as a daemon as long as the system is up. sysvinit systemd sinit Executable format: ELF